﻿using MiniErp.Entity.DataStreams.DOs.Notice;
using MiniErp.Entity.DataStreams.DTOs.Notice;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniErp.Service.BusinessService.IService.Notice
{

    /// <summary>
    /// 公告服务接口
    /// </summary>
    public interface INoticeService
    {
        /// <summary>
        /// 查询所有公告 //分页
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="num">每页数据条数</param>
        /// <returns></returns>
        Task<List<NoticesDTO>> GetAllNoticesAsync(int page, int num);
        /// <summary>
        /// 按更新时间查询所有公告 //分页
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="num">每页数据条数</param>
        /// <param name="starttime">开始时间</param>
        /// <param name="endtime">结束时间</param>
        /// <returns></returns>
        Task<List<NoticesDTO>> GetAllNoticesByTimeAsync(DateTime starttime, DateTime endtime, int page, int num);
        /// <summary>
        ///  指定公告发起人编号查询公告 //分页
        /// </summary>
        ///<param name="uid">公告编写人编号</param>
        /// <param name="page">页码</param>
        /// <param name="num">每页数据条数</param>
        /// <returns></returns>
        Task<List<NoticesDTO>> GetNoticesBySystemsIdAsync(int uid, int page, int num);
        /// <summary>
        ///  指定岗位编号以及更新时间查询公告 //分页
        /// </summary>
        ///<param name="jobsid">岗位编号</param>
        /// <param name="page">页码</param>
        /// <param name="num">每页数据条数</param>
        /// <param name="starttime">开始时间</param>
        /// <param name="endtime">结束时间</param>
        /// <returns></returns>
        Task<List<NoticesDTO>> GetNoticesByJobsIdAndTimeAsync(DateTime starttime, DateTime endtime, int jobsid, int page, int num);
        /// <summary>
        /// 新增公告
        /// </summary>
        /// <param name="NoticesDTO">新增岗位系统权限DTO</param>
        Task<bool> AddNoticesAsync(AddNoticesDTO NoticesDTO);
        /// <summary>
        /// 删除公告
        /// </summary>
        /// <param name="noticesId">公告编号</param>
        Task<bool> DeleteNoticesAsync(int noticesId);

        /// <summary>
        /// 修改公告
        /// </summary>
        /// <param name="NoticesDTO">修改公告dto</param>
        Task<bool> UpdateNoticesAsync(UpdateNoticesDTO NoticesDTO);



    }
}
